//index.js
//获取应用实例
const app = getApp()

Page({
  data: {
    allUser: '',
    normal: '',
    refund: '',
    todayNewUser: '',
    todayProperty: '',
    shopName: '',
    shopAddress: '',
    pic:'',
    shop_pic:'',
    baseimageurl:''
  },
  onShow: function() {
    let that = this;
    app.post('/shop/shouYe').then(res => {
      that.setData({
        allUser: res.allUser,
        normal: parseFloat(res.normal).toFixed(2),
        refund: res.refund,
        todayNewUser: res.todayNewUser,
        todayProperty: parseFloat(res.todayProperty).toFixed(2),
        shopName: app.globalData.shopName,
        shopAddress: app.globalData.shopAddress,
        pic: app.globalData.pic,
        shop_pic: app.globalData.shop_pic,
        baseimageurl: app.globalData.baseImageUrl
      })
    }, res => {
      wx.reLaunch({
        url: '/pages/authorization/authorization',
      })
    });
    console.log(this.data)
  },
  zj: function() {
    wx.navigateTo({
      url: './charges/charges',
    })
  },
  tksq: function() {
    wx.navigateTo({
      url: './drawback/drawback',
    })
  },
  spjg: function() {
    wx.navigateTo({
      url: './product/product',
    })
  }
})